﻿@using System.Configuration

<div id="TileTitle">Administration</div> 
<ul class="NoListStyle">
    <li><a href="@Url.RouteUrl("PageDisplay", new { action = "Page", controller = "WikiTopic", pagePath = "/WikiRoot/WikiDir/HomePage"  })">
        <img src="~/Images/home.gif" alt="HomePage" class="imgLinkNoBorder" />HomePage</a></li>
    <li><a href="mailto:jwdavidson@gmail.com" ><img src="~/Images/email.gif" alt="Email jwdavidson@gmail.com" class="imgLinkNoBorder" />JW Davidson</a></li>
    <li><a href="javascript: if(window.print)window.print()" ><img src="~/Images/printer.png" alt="Print Page" class="imgLinkNoBorder" />Print Page</a></li>
    <li><a href="@Url.RouteUrl("Default", new { action = "Index", controller = "Search", searchTerm = ""  })">
        <img src="~/Images/search.gif" alt="Search Page" class="imgLinkNoBorder" />Search Page</a></li>
    @if (User.IsInRole("WikiAdmin")) {
    <li><a href="@Url.RouteUrl("Default", new { action = "Index", controller = "UserRoles" })" target="_blank">
        <img src="~/Images/wrench.png" alt="Admin Page" class="imgLinkNoBorder" />Admin Page</a></li>
    }
    <li><a href="@Url.RouteUrl("Default", new { action = "Index", controller = "RunScript" })" target="_blank">
        <img src="~/Images/script_gear.png" alt="Run Script" class="imgLinkNoBorder" />Run Script</a></li>
    <li><a href="@Url.RouteUrl("Default", new { action = "Index", controller = "Attachment" })" target="_blank">
        <img src="~/Images/arrow_up.png" alt="Upload Page" class="imgLinkNoBorder" />Upload Page</a></li>
    <li><a href="@Url.RouteUrl("Default", new { action = "Index", controller = "WikiDirectory", fullPath = @"~\WikiRoot\WikiDir" })">
        <img src="~/Images/drive_web.png" alt="Select Directory" class="imgLinkNoBorder" />Select Directory</a></li>
    <li><a href="@Url.RouteUrl("Default", new { action = "Export", controller = "WikiDirectory"})">
        <img src="~/Images/arrow_down.png" alt="Export Directory Topics" class="imgLinkNoBorder" />Export Directory Topics</a></li>
    <li><a href="@Url.RouteUrl("Default", new { action = "WikiTopicListing", controller = "WikiDirectory" })">
        <img src="~/Images/folder_explore.png" alt="Topic Listing" class="imgLinkNoBorder" />Topic Listing</a></li>
    @if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["RssFeed"])) {
    <li><a href="@ConfigurationManager.AppSettings["RssFeed"]">
        <img src="~/Images/feed.png" alt="Rss Feed" class="imgLinkNoBorder" />Rss Feed</a></li>
    }
    @if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["AtomFeed"])) {
    <li><a href="@ConfigurationManager.AppSettings["AtomFeed"]">
        <img src="~/Images/feed.png" alt="Rss Feed" class="imgLinkNoBorder" />Atom Feed</a></li>
    }
    @if (!Request.Url.ToString().Contains("localhost") && !string.IsNullOrEmpty(ConfigurationManager.AppSettings["GooglePlusBadge"])) {
        if (ConfigurationManager.AppSettings["GooglePlusBadge"] == "true") {
         <li><div class="g-plusone" data-size="medium" data-annotation="none"></div></li>   
        }
    }
</ul>
<hr />
<div>Local Search
    @using (Html.BeginForm("Index", "Search", FormMethod.Post, new { id = "LocalSearch" })) {
        <input type="text" name="txtSrchTerm" id="txtSrchTerm" /> 
        <input type="image" alt="Submit Local Search" src="~/Images/search.gif" id="btnSrch" name="btnSrch" />
        <input type="hidden" name="txtSrchFld" id="txtSearchFld" value="WikiText" />
    }
</div>
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>